package com.xg.service.impl;

import com.xg.common.response.UsedCarType;
import com.xg.common.result.ApiResult;
import com.xg.common.util.PageUtil;
import com.xg.feign.ServiceCarFeignClient;
import com.xg.service.UsedCarTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UsedCarTypeServiceImpl implements UsedCarTypeService {

    @Autowired
    private ServiceCarFeignClient serviceCarFeignClient;

    @Override
    public PageUtil<UsedCarType> list(Map<String, Object> params) {
        return serviceCarFeignClient.queryPage(params);
    }

    @Override
    public ApiResult<List<UsedCarType>> queryUsedTypeList() {
        return serviceCarFeignClient.queryUsedTypeList();
    }

    @Override
    public ApiResult deleteType(List<Integer> ids) {
        return serviceCarFeignClient.deleteType(ids);
    }

    @Override
    public ApiResult<UsedCarType> selectTypeInfo(Integer typeId) {
        return serviceCarFeignClient.selectTypeInfo(typeId);
    }

    @Override
    public ApiResult saveType(UsedCarType usedCarType) {
        return serviceCarFeignClient.saveType(usedCarType);
    }
}
